﻿using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using SheepStorage.Domain.Entity;

namespace SheepStorage.Domain
{
    public partial class SheepDbContext : DbContext
    {
        public SheepDbContext()
        {
        }


        public SheepDbContext(DbContextOptions<SheepDbContext> options)
            : base(options)
        {
        }
        /// <summary>
        /// 角色菜单权限表
        /// </summary>

        public virtual DbSet<MenuRolePermission> MenuRolePermission { get; set; } = null!;



        public virtual DbSet<BodySize> BodySizes { get; set; } = null!;
        public virtual DbSet<BuildingManagement> BuildingManagements { get; set; } = null!;
        public virtual DbSet<CertificateList> CertificateLists { get; set; } = null!;
        public virtual DbSet<ContactList> ContactLists { get; set; } = null!;
        public virtual DbSet<Customer> Customers { get; set; } = null!;
        public virtual DbSet<Department> Departments { get; set; } = null!;
        public virtual DbSet<EarTagTable> EarTagTables { get; set; } = null!;
        public virtual DbSet<EducationalExperience> EducationalExperiences { get; set; } = null!;
        public virtual DbSet<EmergencyContact> EmergencyContacts { get; set; } = null!;
        public virtual DbSet<Enterprise> Enterprises { get; set; } = null!;
        public virtual DbSet<FamilyRelationship> FamilyRelationships { get; set; } = null!;
        public virtual DbSet<LambWeaning> LambWeanings { get; set; } = null!;
        public virtual DbSet<MenuList> MenuLists { get; set; } = null!;
        public virtual DbSet<MenuPermission> MenuPermissions { get; set; } = null!;
        public virtual DbSet<Permission> Permissions { get; set; } = null!;
        public virtual DbSet<Personnel> Personnel { get; set; } = null!;
        public virtual DbSet<ProgenyTransfer> ProgenyTransfers { get; set; } = null!;
        public virtual DbSet<PromptModel> PromptModels { get; set; } = null!;
        public virtual DbSet<ProviderManage> ProviderManages { get; set; } = null!;
        public virtual DbSet<Province> Provinces { get; set; } = null!;
        public virtual DbSet<Role> Roles { get; set; } = null!;
        public virtual DbSet<RoleMenu> RoleMenus { get; set; } = null!;
        public virtual DbSet<SelfEvaluation> SelfEvaluations { get; set; } = null!;
        public virtual DbSet<SheepChangeDormitory> SheepChangeDormitories { get; set; } = null!;
        public virtual DbSet<SheepCondition> SheepConditions { get; set; } = null!;
        public virtual DbSet<SheepDeath> SheepDeaths { get; set; } = null!;
        public virtual DbSet<SheepField> SheepFields { get; set; } = null!;
        public virtual DbSet<SheepManagement> SheepManagements { get; set; } = null!;
        public virtual DbSet<SheepMark> SheepMarks { get; set; } = null!;
        public virtual DbSet<SheepMomDelivery> SheepMomDeliveries { get; set; } = null!;
        public virtual DbSet<SheepMomHistory> SheepMomHistories { get; set; } = null!;
        public virtual DbSet<SheepMomHybridization> SheepMomHybridizations { get; set; } = null!;
        public virtual DbSet<SheepMomPergnant> SheepMomPergnants { get; set; } = null!;
        public virtual DbSet<SheepMomWeaning> SheepMomWeanings { get; set; } = null!;
        public virtual DbSet<SheepOut> SheepOuts { get; set; } = null!;
        public virtual DbSet<SheepPurchase> SheepPurchases { get; set; } = null!;
        public virtual DbSet<SheepRecord> SheepRecords { get; set; } = null!;
        public virtual DbSet<SheepSale> SheepSales { get; set; } = null!;
        public virtual DbSet<SheepWeight> SheepWeights { get; set; } = null!;
        public virtual DbSet<UserInfo> UserInfos { get; set; } = null!;
        public virtual DbSet<UserRole> UserRoles { get; set; } = null!;
        public virtual DbSet<WorkExperience> WorkExperiences { get; set; } = null!;
        public virtual DbSet<YourTableName> YourTableNames { get; set; } = null!;

        public virtual DbSet<Area> Area { get; set; } = null!;

        public virtual DbSet<Place> Place { get; set; } = null!;

        //        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        //        {
        //            if (!optionsBuilder.IsConfigured)
        //            {
        //#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263.
        //                optionsBuilder.UseSqlServer("server=10.31.60.49;uid=sa;pwd=123456;database=db_SheepFarms");
        //            }
        //        }


        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            // MenuRolePermission

            modelBuilder.Entity<MenuRolePermission>(entity =>
            {
                entity.ToTable("MenuRolePermission");

                entity.HasKey(e => e.MRPId)
                   .HasName("PK__MenuRole__DE40949525257499");

                entity.Property(e => e.PermissionName)
                    .HasMaxLength(255)
                    .IsUnicode(false);
            });




            modelBuilder.Entity<BodySize>(entity =>
            {
                entity.ToTable("BodySize");

                entity.Property(e => e.AddName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AddTime).HasColumnType("datetime");

                entity.Property(e => e.BodyBackWeight).HasColumnType("decimal(18, 0)");

                entity.Property(e => e.BodyEyeArea).HasColumnType("decimal(18, 0)");

                entity.Property(e => e.BodyEyeWeight).HasColumnType("decimal(18, 0)");

                entity.Property(e => e.BodyFoot).HasColumnType("decimal(18, 0)");

                entity.Property(e => e.BodyHeight).HasColumnType("decimal(18, 0)");

                entity.Property(e => e.BodyLength).HasColumnType("decimal(18, 0)");

                entity.Property(e => e.BodyScrotum).HasColumnType("decimal(18, 0)");

                entity.Property(e => e.BodyThorax).HasColumnType("decimal(18, 0)");

                entity.Property(e => e.SheepType)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.CheckBuilding)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.CheckDate).HasColumnType("datetime");

                entity.Property(e => e.CheckField)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.DelName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.DelTime).HasColumnType("datetime");

                entity.Property(e => e.ElEarTag)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.OverBit)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.Remarks)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            });

            modelBuilder.Entity<BuildingManagement>(entity =>
            {
                entity.ToTable("BuildingManagement");

                // entity.Property(e => e.BuildingManagementId).ValueGeneratedNever();
                // PK__Building__75BD7391C84D127C
                entity.HasKey(e => e.BuildingManagementId).HasName("PK__Building__75BD7391C84D127C");
                entity.Property(e => e.AddName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AddTime).HasColumnType("datetime");

                entity.Property(e => e.BuildingDuty)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.BuildingName)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.BuildingType)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.DelName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.DelTime).HasColumnType("datetime");

                entity.Property(e => e.ProductionPeason)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.Remarks)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            });

            modelBuilder.Entity<CertificateList>(entity =>
            {
                entity.HasKey(e => e.CertificateId)
                    .HasName("PK__Certific__BBF8A7C1E6E120AC");

                entity.ToTable("CertificateList");

                entity.Property(e => e.Authority)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.AuthorityDate).HasColumnType("datetime");

                entity.Property(e => e.CertificateCode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.CertificateName)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.CertificateType)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.EffectiveDate).HasColumnType("datetime");
            });

            modelBuilder.Entity<ContactList>(entity =>
            {
                entity.HasKey(e => e.ContactId)
                    .HasName("PK__ContactL__5C66259B89C0ED2B");

                entity.ToTable("ContactList");

                entity.Property(e => e.ContactEmail)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.ContactPhone)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ContactPlace)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.ContactQq)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasColumnName("ContactQQ");

                entity.Property(e => e.ContactWx)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasColumnName("ContactWX");
            });

            modelBuilder.Entity<Customer>(entity =>
            {
                entity.ToTable("Customer");

                entity.Property(e => e.CustomerId).ValueGeneratedNever();

                entity.Property(e => e.CooperationTime).HasColumnType("datetime");

                entity.Property(e => e.CustomerCollectionFile)
                    .HasMaxLength(255)
                    .IsUnicode(false);

                entity.Property(e => e.CustomerIdentityCard)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.CustomerMarkets)
                    .HasMaxLength(255)
                    .IsUnicode(false);

                entity.Property(e => e.CustomerName)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.CustomerNumber)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.CustomerSalesman)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.CustomerStage)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.IndustryInvolved)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.IntentionalProduct)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.MnemonicCode)
                    .HasMaxLength(10)
                    .IsUnicode(false);

                entity.Property(e => e.ProviderAffiliatedUnit)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.ProviderMarket)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.ResponsibleName)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ResponsiblePhone)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.SuperiorCustomer)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.UnifiedSocialCredit)
                    .HasMaxLength(30)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Department>(entity =>
            {
                entity.ToTable("Department");

                // entity.Property(e => e.DepartmentId).ValueGeneratedNever() ;
                entity.HasKey(e => e.DepartmentId)
                  .HasName("PK__Departme__B2079BED9C78E2B3");
                entity.Property(e => e.DepartmentArea)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.DepartmentCheck)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.DepartmentDuty)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.DepartmentManager)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.DepartmentMoney)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.DepartmentName)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.DepartmentTop)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.DepartmentType)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.DutyManage)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.ImmediateSuperior)
                    .HasMaxLength(30)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<EarTagTable>(entity =>
            {
                entity.ToTable("EarTagTable");

                entity.HasKey(e => e.EarTagId)
                    .HasName("PK__EarTagTa__6D728695350D2F19");

                //entity.Property(e => e.EarTagId).ValueGeneratedNever();

                entity.Property(e => e.EarTagType)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.EarpreFix)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.ElEarTag)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.OverBit)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.OverNumber)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.OverPrefix)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.WarehouseOperator)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.WarehousingDate).HasColumnType("date");
            });

            modelBuilder.Entity<EducationalExperience>(entity =>
            {
                entity.ToTable("EducationalExperience");

                entity.Property(e => e.Education)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.EndSchool)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.EndTime).HasColumnType("date");

                entity.Property(e => e.Intake).HasColumnType("date");

                entity.Property(e => e.Speciality)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.SpecialityDesc)
                    .HasMaxLength(100)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<EmergencyContact>(entity =>
            {
                entity.ToTable("EmergencyContact");

                entity.Property(e => e.EmergencyContactAddress)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.EmergencyContactName)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.EmergencyContactPhone)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.EmergencyContactPlace)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.EmergencyContactWx)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasColumnName("EmergencyContactWX");
            });

            modelBuilder.Entity<Enterprise>(entity =>
            {
                entity.ToTable("Enterprise");

                // entity.Property(e => e.EnterpriseId).ValueGeneratedNever();
                entity.HasKey(e => e.EnterpriseId).HasName("PK__Enterpri__52DEA566BC05ACAC");

                entity.Property(e => e.CheckPeople)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.DutyManage)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.DutyMoney)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.DutyPeople)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.PlaceId)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.EnterpriseCode)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.EnterpriseDesc)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.EnterpriseLabel)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.EnterpriseLogo)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.EnterpriseName)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.EnterprisePhone)
                    .HasMaxLength(30)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<FamilyRelationship>(entity =>
            {
                entity.HasKey(e => e.FamilyRelationshipsId)
                    .HasName("PK__FamilyRe__1FB7636A9BDDA8D7");

                entity.Property(e => e.FamilyDuties)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.FamilyFace)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.FamilyName)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.FamilyPhone)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.FamilyRelationship1)
                    .HasMaxLength(30)
                    .IsUnicode(false)
                    .HasColumnName("FamilyRelationship");

                entity.Property(e => e.FamilyWorkPlace)
                    .HasMaxLength(30)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<LambWeaning>(entity =>
            {
                entity.ToTable("LambWeaning");

                entity.Property(e => e.AddName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AddTime).HasColumnType("datetime");

                entity.Property(e => e.DelName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.DelTime).HasColumnType("datetime");

                entity.Property(e => e.ElectronicMotherOverbit)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.ElectronicOverbit)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.LambOverbit)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.NursingMotherOverbit)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.Remarks)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.RollOutField)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.TransferOutDormitory)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.PurchaseSerialNumber)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.DocumentNumber)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");

                entity.Property(e => e.WeaningTime).HasColumnType("datetime");

                entity.Property(e => e.WeaningWeight).HasColumnType("decimal(10, 2)");
            });

            modelBuilder.Entity<MenuList>(entity =>
            {
                entity.HasKey(e => e.MenuId)
                    .HasName("PK__MenuList__C99ED23081E7A430");

                entity.ToTable("MenuList");

                entity.Property(e => e.MenuIcon)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.MenuName)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.MenuUrl)
                    .HasMaxLength(30)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<MenuPermission>(entity =>
            {
                entity.ToTable("MenuPermission");
            });

            modelBuilder.Entity<Permission>(entity =>
            {
                entity.ToTable("Permission");

                entity.Property(e => e.PermissionName)
                    .HasMaxLength(255)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Personnel>(entity =>
            {
                entity.Property(e => e.AddName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AddTime).HasColumnType("datetime");

                entity.Property(e => e.DelName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.DelTime).HasColumnType("datetime");

                entity.Property(e => e.ForeignLanguages)
                    .HasMaxLength(255)
                    .IsUnicode(false);

                entity.Property(e => e.GraduationDate).HasColumnType("datetime");

                entity.Property(e => e.HighestProfessional)
                    .HasMaxLength(255)
                    .IsUnicode(false);

                entity.Property(e => e.LanguageProficiency)
                    .HasMaxLength(255)
                    .IsUnicode(false);

                entity.Property(e => e.MaritalStatus)
                    .HasMaxLength(255)
                    .IsUnicode(false);

                entity.Property(e => e.OldPersonnelName)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.PersonnelBirthday).HasColumnType("date");

                entity.Property(e => e.PersonnelBloodType)
                    .HasMaxLength(10)
                    .IsUnicode(false);

                entity.Property(e => e.PersonnelFace)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.PersonnelHealthStatus)
                    .HasMaxLength(255)
                    .IsUnicode(false);

                entity.Property(e => e.PersonnelHeight)
                    .HasMaxLength(10)
                    .IsUnicode(false);

                entity.Property(e => e.PersonnelHighLevel)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.PersonnelInPlace)
                    .HasMaxLength(80)
                    .IsUnicode(false);

                entity.Property(e => e.PersonnelJoinDate).HasColumnType("datetime");

                entity.Property(e => e.PersonnelName)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.PersonnelNation)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.PersonnelNature)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.PersonnelNewDate).HasColumnType("datetime");

                entity.Property(e => e.PersonnelNumber)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.PersonnelPlace)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.PersonnelSchool)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.PersonnelWeight)
                    .HasMaxLength(10)
                    .IsUnicode(false);

                entity.Property(e => e.RecruitmentChannels)
                    .HasMaxLength(255)
                    .IsUnicode(false);

                entity.Property(e => e.Remarks)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");

                entity.Property(e => e.WeddingDay).HasColumnType("datetime");

                entity.Property(e => e.WhetherForeign)
                    .HasMaxLength(5)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<ProgenyTransfer>(entity =>
            {
                entity.ToTable("ProgenyTransfer");

                entity.Property(e => e.AddName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AddTime).HasColumnType("datetime");

                entity.Property(e => e.DelName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.DelTime).HasColumnType("datetime");

                entity.Property(e => e.DocumentNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ElEarTag)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.OverBit)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.Remarks)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.SerialNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.TransferBuilding)
                    .HasMaxLength(100)
                    .IsUnicode(false);

				///TransferDate
				entity.Property(e => e.TransferDate).HasColumnType("datetime");

				


				entity.Property(e => e.TransferField)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.TransferRemark).HasMaxLength(200);

                //entity.Property(e => e.TransferShiftBuilding)
                //    .HasMaxLength(100)
                //    .IsUnicode(false);

                //entity.Property(e => e.TransferShiftField)
                //    .HasMaxLength(100)
                //    .IsUnicode(false);

                entity.Property(e => e.UpdateName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            });

            modelBuilder.Entity<PromptModel>(entity =>
            {
                entity.HasKey(e => e.PromptId)
                    .HasName("PK__PromptMo__456CA7536AA272C3");

                entity.ToTable("PromptModel");

                entity.Property(e => e.AddName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AddTime).HasColumnType("datetime");

                entity.Property(e => e.BuildingManagementId)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.DelName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.DelTime).HasColumnType("datetime");

                entity.Property(e => e.OverBit)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Remarks)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.SheepFieldId)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.State)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Type)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            });

            modelBuilder.Entity<ProviderManage>(entity =>
            {
                entity.HasKey(e => e.ProviderId)
                    .HasName("PK__Provider__B54C687D950B16B1");

                entity.ToTable("ProviderManage");

                entity.Property(e => e.AddName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AddTime).HasColumnType("datetime");

                entity.Property(e => e.DelName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.DelTime).HasColumnType("datetime");

                entity.Property(e => e.ProviderAffiliatedUnit)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.ProviderIdentityCard)
                    .HasMaxLength(18)
                    .IsUnicode(false);

                entity.Property(e => e.ProviderIndustryInvolved)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.ProviderMarket)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ProviderMnemonicCode)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ProviderName)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.ProviderNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ProviderPrincipalName)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ProviderPrincipalPhone)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ProviderProperty)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ProviderRemarks)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.ProviderSalesman)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ProviderUnifiedSocialCredit)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.ProviderUnitsOfReference)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.Remarks)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            });

            modelBuilder.Entity<Province>(entity =>
            {
                entity.ToTable("Province");

                entity.Property(e => e.ProvinceName)
                    .HasMaxLength(30)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Role>(entity =>
            {
                entity.Property(e => e.RoleDesc)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.RoleName)
                    .HasMaxLength(30)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<RoleMenu>(entity =>
            {
                entity.ToTable("RoleMenu");

                // entity.Property(e => e.RoleMenuId).ValueGeneratedNever();

                entity.HasKey(e => e.RoleMenuId)
                  .HasName("PK__RoleMenu__F86287B6261832A7");
            });

            modelBuilder.Entity<SelfEvaluation>(entity =>
            {
                entity.ToTable("SelfEvaluation");

                entity.Property(e => e.Annex)
                    .HasMaxLength(500)
                    .IsUnicode(false);

                entity.Property(e => e.SelfDesc)
                    .HasMaxLength(100)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<SheepChangeDormitory>(entity =>
            {
                entity.ToTable("SheepChangeDormitory");

                entity.Property(e => e.AddName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AddTime).HasColumnType("datetime");

                entity.Property(e => e.AuditTime).HasColumnType("datetime");

                entity.Property(e => e.Auditor)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ChangeRemark).IsUnicode(false);

                entity.Property(e => e.DelName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.DelTime).HasColumnType("datetime");

                entity.Property(e => e.DocumentNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                //entity.Property(e => e.DriveField)
                //    .HasMaxLength(100)
                //    .IsUnicode(false);

                entity.Property(e => e.ElEarTag)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.OverBit)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.Remarks)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.RollOutField)
                   .HasMaxLength(100)
                  .IsUnicode(false);

                entity.Property(e => e.SerialNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false);

				entity.Property(e => e.TransferOutDormitory)
				   .HasMaxLength(100)
				    .IsUnicode(false);

				//entity.Property(e => e.TransferToDormitory)
				//    .HasMaxLength(100)
				//    .IsUnicode(false);
				entity.Property(e => e.ChangedormitoryDate).HasColumnType("datetime");


				entity.Property(e => e.UpdateName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");

                //entity.Property(e => e.Variety)
                //    .HasMaxLength(100)
                //    .IsUnicode(false);
            });

            modelBuilder.Entity<SheepCondition>(entity =>
            {
                entity.ToTable("SheepCondition");

                entity.Property(e => e.AddName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AddTime).HasColumnType("datetime");

                entity.Property(e => e.CheckDate).HasColumnType("datetime");

                entity.Property(e => e.ConditionCorner)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.ConditionFat)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.ConditionHair)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.ConditionStain)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.DelName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.DelTime).HasColumnType("datetime");

                entity.Property(e => e.ElEarTag)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.MouthColor)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.OverBit)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.Remarks)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.SheepConditionBuilding)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.SheepConditionField)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.SheepType)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.ShoeColor)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.TeethTobite)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            });

            modelBuilder.Entity<SheepDeath>(entity =>
            {
                entity.ToTable("SheepDeath");

                entity.HasKey(e => e.SheepDeathId).HasName("PK__SheepDea__87BC333C22A4BDC9");
                //entity.Property(e => e.SheepDeathId).ValueGeneratedNever();

                entity.Property(e => e.DocumentNumber)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.ElEarTag)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.OverBit)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.PurchaseSerialNumber)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.SheepDeathDate).HasColumnType("date");

                entity.Property(e => e.SheepBirthDate).HasColumnType("date");

                
            });

            modelBuilder.Entity<SheepField>(entity =>
            {
                entity.ToTable("SheepField");

                entity.Property(e => e.BuildingManagementId)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.Prefix)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.SheepFieldName)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.SheepFieldNumber)
                    .HasMaxLength(30)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<SheepManagement>(entity =>
            {
                entity.ToTable("SheepManagement");

                // entity.Property(e => e.SheepManagementId).ValueGeneratedNever();
                entity.HasKey(e => e.SheepManagementId).HasName("PK__SheepMan__84EAB0BFF4265419");
                entity.Property(e => e.SheepAddress)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.SheepDateTime).HasColumnType("datetime");

                entity.Property(e => e.SheepDuty)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.SheepManage)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.PlaceId)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.SheepScale)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.SheepShortName)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.SheepYardName)
                    .HasMaxLength(30)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<SheepMark>(entity =>
            {

                entity.ToTable("SheepMark");

                entity.HasKey(e => e.SheepMarkId)
                    .HasName("PK__SheepMar__74F7F5B70C5AA617");

                //entity.Property(e => e.SheepMarkId).ValueGeneratedNever();

                entity.Property(e => e.ElEarTag)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.NewElEarTag)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.OldElEarTag)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.OverBit)
                    .HasMaxLength(30)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<SheepMomDelivery>(entity =>
            {
                entity.HasKey(e => e.MomDeliveryId)
                    .HasName("PK__SheepMom__63910D8E5AEDDED6");

                entity.ToTable("SheepMomDelivery");

                entity.Property(e => e.AddName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AddTime).HasColumnType("datetime");

                entity.Property(e => e.DelName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.DelTime).HasColumnType("datetime");

                entity.Property(e => e.DeliveryAuditor).HasMaxLength(20);

                entity.Property(e => e.DeliveryAuditorDate).HasColumnType("datetime");

                entity.Property(e => e.DeliveryDieAvgWeight).HasColumnType("decimal(18, 0)");

                entity.Property(e => e.DeliveryDieSumWeight).HasColumnType("decimal(18, 0)");

                entity.Property(e => e.DeliveryDocuument).HasMaxLength(20);

                entity.Property(e => e.DeliveryLivingAvgWeight).HasColumnType("decimal(18, 0)");

                entity.Property(e => e.DeliveryLivingSumWeight).HasColumnType("decimal(18, 0)");

                entity.Property(e => e.DeliveryPrincipal).HasMaxLength(20);

                entity.Property(e => e.DeliveryRemark).HasMaxLength(100);

                entity.Property(e => e.DeliverySlowId).HasMaxLength(20);

                entity.Property(e => e.DeliveryTotalWeight).HasColumnType("decimal(18, 0)");

                entity.Property(e => e.MomDeliveryDate).HasColumnType("datetime");

                entity.Property(e => e.MomDeliveryLactation).HasMaxLength(20);

                entity.Property(e => e.OverBit).HasMaxLength(20);

                entity.Property(e => e.PurchaseSerialNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Remarks)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.DeliveryBuilding)
                    .HasMaxLength(50)
                    .IsUnicode(false);
                entity.Property(e => e.DeliveryField)
                  .HasMaxLength(50)
                  .IsUnicode(false);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            });

            modelBuilder.Entity<SheepMomHistory>(entity =>
            {
                entity.HasKey(e => e.MomHistoryId)
                    .HasName("PK__SheepMom__AEB6243A21A5B12B");

                entity.ToTable("SheepMomHistory");

                entity.Property(e => e.AddName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AddTime).HasColumnType("datetime");

                entity.Property(e => e.DelName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.DelTime).HasColumnType("datetime");

                entity.Property(e => e.DocumentNumbe).HasMaxLength(50);

                entity.Property(e => e.ElEarTag).HasMaxLength(20);

                entity.Property(e => e.MomHistoryDadOverbit).HasMaxLength(20);

                entity.Property(e => e.MomHistoryDate).HasColumnType("datetime");

                entity.Property(e => e.MomHistoryDeliveryDate).HasColumnType("datetime");

                entity.Property(e => e.MomHistoryHealthWeight).HasColumnType("decimal(18, 0)");

                entity.Property(e => e.MomHistoryPregnantDate).HasColumnType("datetime");

                entity.Property(e => e.MomHistoryWeaningDate).HasColumnType("datetime");

                entity.Property(e => e.MomHistoryWeaningWeight).HasColumnType("decimal(18, 0)");

                entity.Property(e => e.OverBit).HasMaxLength(20);

                entity.Property(e => e.SerialNumber).HasMaxLength(50);

                entity.Property(e => e.UpdateName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            });

            modelBuilder.Entity<SheepMomHybridization>(entity =>
            {
                entity.HasKey(e => e.MomHybridizationId)
                    .HasName("PK__SheepMom__8FC7F1A5014521DE");

                entity.ToTable("SheepMomHybridization");

                entity.Property(e => e.AddName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AddTime).HasColumnType("datetime");

                //entity.Property(e => e.BuildingName).HasMaxLength(20);

                entity.Property(e => e.DelName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.DelTime).HasColumnType("datetime");

                entity.Property(e => e.DocumentNumber).HasMaxLength(50);

                entity.Property(e => e.ElEarTag).HasMaxLength(20);

                entity.Property(e => e.MomHybridizationDad).HasMaxLength(20);

                entity.Property(e => e.MomHybridizationDate).HasColumnType("datetime");

                entity.Property(e => e.MomHybridizationLastDate).HasColumnType("datetime");

                entity.Property(e => e.MomHybridizationRemark).HasMaxLength(100);

                entity.Property(e => e.MomHybridizationScore).HasMaxLength(20);

                entity.Property(e => e.MomHybridizationWeight).HasColumnType("decimal(18, 0)");

                //entity.Property(e => e.NewBuildingName)
                //    .HasMaxLength(20)
                //    .HasColumnName("newBuildingName");

                //entity.Property(e => e.NewSheepFieldName)
                //    .HasMaxLength(20)
                //    .HasColumnName("newSheepFieldName");

                entity.Property(e => e.OverBit).HasMaxLength(20);

                entity.Property(e => e.SerialNumber).HasMaxLength(50);

                //entity.Property(e => e.SheepFieldName).HasMaxLength(20);

                entity.Property(e => e.UpdateName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");
                entity.Property(e => e.CheckDate).HasColumnType("datetime");
            });

            modelBuilder.Entity<SheepMomPergnant>(entity =>
            {
                entity.HasKey(e => e.MomPergnantId)
                    .HasName("PK__SheepMom__A117030AAC29EA79");

                entity.ToTable("SheepMomPergnant");

                entity.Property(e => e.AddName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AddTime).HasColumnType("datetime");

                entity.Property(e => e.DelName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.DelTime).HasColumnType("datetime");

                entity.Property(e => e.DeliveryDocuument).HasMaxLength(20);

                entity.Property(e => e.ElEarTag)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.MomPergnantDate).HasColumnType("datetime");

                entity.Property(e => e.MomPergnantPrincipal).HasMaxLength(20);

                entity.Property(e => e.MomPergnantRemark).HasMaxLength(100);

                entity.Property(e => e.OverBit).HasMaxLength(20);

                entity.Property(e => e.PurchaseSerialNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false); 

                entity.Property(e => e.Remarks)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.MomPergnantBuilding)
                   .HasMaxLength(50)
                   .IsUnicode(false);

                entity.Property(e => e.MomPergnantField)
                   .HasMaxLength(50)
                   .IsUnicode(false);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            });

            modelBuilder.Entity<SheepMomWeaning>(entity =>
            {
                entity.ToTable("SheepMomWeaning");

                entity.Property(e => e.AddName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AddTime).HasColumnType("datetime");

                entity.Property(e => e.DelName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.DelTime).HasColumnType("datetime");

                entity.Property(e => e.ElectronicOverbit)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.Overbit)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.Remarks)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.RollOutField)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.SheepMomWeight).HasColumnType("decimal(10, 2)");

                entity.Property(e => e.TransferOutDormitory)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");

                entity.Property(e => e.WeaningDate).HasColumnType("datetime");

                entity.Property(e => e.WeaningReason)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.WeaningWeight).HasColumnType("decimal(10, 2)");

                //entity.Property(e => e.Spermat)
                //.HasMaxLength(100)
                //.IsUnicode(false);
                entity.Property(e => e.DocumentNumber)
                .HasMaxLength(100)
                .IsUnicode(false);
                entity.Property(e => e.PurchaseSerialNumber)
                .HasMaxLength(100)
                .IsUnicode(false);
            });

            modelBuilder.Entity<SheepOut>(entity =>
            {
                entity.ToTable("SheepOut");

                entity.Property(e => e.SheepOutId).ValueGeneratedNever();

                entity.Property(e => e.DocumentNumber)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.ElEarTag)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.InBuildingName)
                    .HasMaxLength(60)
                    .IsUnicode(false);

                entity.Property(e => e.InSheepFieldName)
                    .HasMaxLength(60)
                    .IsUnicode(false);

                entity.Property(e => e.OutBuildingName)
                    .HasMaxLength(60)
                    .IsUnicode(false);

                entity.Property(e => e.OutSheepFieldName)
                    .HasMaxLength(60)
                    .IsUnicode(false);

                entity.Property(e => e.OverBit)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.PurchaseSerialNumber)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.ReviewerPeople)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.ReviewerTime)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.SheepOutReason)
                    .HasMaxLength(255)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<SheepPurchase>(entity =>
            {
                entity.HasKey(e => e.PurchaseId)
                    .HasName("PK__SheepPur__6B0A6BBE3FA99A03");

                entity.ToTable("SheepPurchase");

                entity.Property(e => e.AddName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AddTime).HasColumnType("datetime");

                entity.Property(e => e.BuildingName)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.ColumnsName)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.DelName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.DelTime).HasColumnType("datetime");

                entity.Property(e => e.DocumentNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.OverBit)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.PurchaseAdjustAmount).HasColumnType("decimal(10, 2)");

                entity.Property(e => e.PurchaseBuyer)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.PurchaseDate).HasColumnType("datetime");

                entity.Property(e => e.PurchaseDiscount).HasColumnType("decimal(10, 2)");

                entity.Property(e => e.PurchaseGoodsName)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.PurchaseMeasure)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.PurchaseMoney).HasColumnType("decimal(10, 2)");

                entity.Property(e => e.PurchaseOnlyEvenly).HasColumnType("decimal(10, 2)");

                entity.Property(e => e.PurchaseRemark)
                    .HasMaxLength(200)
                    .IsUnicode(false);

                entity.Property(e => e.PurchaseSerialNumber)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.PurchaseSettlementAmount).HasColumnType("decimal(10, 2)");

                entity.Property(e => e.PurchaseStage)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.PurchaseStandardPackage)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.PurchaseTotalWeight).HasColumnType("decimal(10, 2)");

                entity.Property(e => e.Remarks)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");

                entity.Property(e => e.WareHouse)
                    .HasMaxLength(100)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<SheepRecord>(entity =>
            {
                entity.ToTable("SheepRecord");

                entity.Property(e => e.AddName).HasMaxLength(20);

                entity.Property(e => e.AddTime).HasColumnType("datetime");

                entity.Property(e => e.BuildingName).HasMaxLength(20);

                entity.Property(e => e.DelName).HasMaxLength(20);

                entity.Property(e => e.DelTime).HasColumnType("datetime");

                entity.Property(e => e.ElEarTag).HasMaxLength(20);

                entity.Property(e => e.OverBit).HasMaxLength(20);

                entity.Property(e => e.Remarks).HasMaxLength(20);

                entity.Property(e => e.SheepFieldName).HasMaxLength(20);

                entity.Property(e => e.SheepRecordBirthDate).HasColumnType("datetime");

                entity.Property(e => e.SheepRecordDadOverbit).HasMaxLength(20);

                entity.Property(e => e.SheepRecordMomOverbit).HasMaxLength(20);

                entity.Property(e => e.SheepRecordRemark).HasMaxLength(100);

                entity.Property(e => e.SheepRecordWeaningDate).HasColumnType("datetime");

                entity.Property(e => e.SheepRecordWeaningWeight).HasColumnType("decimal(18, 0)");

                entity.Property(e => e.SheepRecordWeightBirth).HasColumnType("decimal(18, 0)");

                entity.Property(e => e.UpdateName).HasMaxLength(20);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            });

            modelBuilder.Entity<SheepSale>(entity =>
            {
                entity.ToTable("SheepSale");

                entity.Property(e => e.SheepSaleId).ValueGeneratedNever();

                entity.Property(e => e.DiscountRatio).HasColumnType("decimal(5, 2)");

                entity.Property(e => e.DocumentNumber)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.ElEarTag)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.FatherEarTag)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.MotherEarTag)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.OverBit)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.PurchaseSerialNumber)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.ReceiverAddress)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.SheepSaleAuditTime).HasColumnType("datetime");

                entity.Property(e => e.SheepSaleAuditor)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.SheepSaleBirthTime).HasColumnType("datetime");

                entity.Property(e => e.SheepSaleBirthWeight).HasColumnType("decimal(5, 2)");

                entity.Property(e => e.SheepSaleDate).HasColumnType("datetime");

                entity.Property(e => e.SheepSaleFinancialAuditTime).HasColumnType("datetime");

                entity.Property(e => e.SheepSaleFinancialAuditor)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.SheepSalePricing).HasColumnType("decimal(10, 2)");

                entity.Property(e => e.SheepSaleWarehouseAuditor)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.SheepSaleWeaningWeight).HasColumnType("decimal(5, 2)");

                entity.Property(e => e.TransactionPrice).HasColumnType("decimal(10, 2)");
            });

            modelBuilder.Entity<SheepWeight>(entity =>
            {
                entity.ToTable("SheepWeight");

                entity.Property(e => e.AddName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AddTime).HasColumnType("datetime");

                entity.Property(e => e.DelName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.DelTime).HasColumnType("datetime");

                entity.Property(e => e.ElEarTag)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.OverBit)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.Remarks)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.SheepType)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");

                entity.Property(e => e.WeightDate).HasColumnType("datetime");

                entity.Property(e => e.WeightType)
                    .HasMaxLength(30)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<UserInfo>(entity =>
            {
                entity.HasKey(e => e.UserId)
                    .HasName("PK__UserInfo__1788CC4CA47E030F");

                entity.ToTable("UserInfo");

                entity.Property(e => e.AddName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AddTime).HasColumnType("datetime");

                entity.Property(e => e.DateOnBoard).HasColumnType("datetime");

                entity.Property(e => e.DelName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.DelTime).HasColumnType("datetime");

                entity.Property(e => e.PersonnelHighLevel)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.PersonnelLevel)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.PersonnelSchool)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.Position)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.PositiveDates).HasColumnType("datetime");

                entity.Property(e => e.PostStation)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.Remarks)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");

                entity.Property(e => e.UserCode)
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.UserEmail)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.UserName)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.UserNikeName)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.UserPassWord)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.UserPhone)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.UserTrueName)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                //entity.Property(e => e.DepartmentId)
                //     .HasMaxLength(50)
                //     .IsUnicode(false);

            });

            modelBuilder.Entity<UserRole>(entity =>
            {
                entity.ToTable("UserRole");
            });

            modelBuilder.Entity<WorkExperience>(entity =>
            {
                entity.ToTable("WorkExperience");

                entity.Property(e => e.Department)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.LeaveReason)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.WorkContent)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.WorkTime).HasColumnType("datetime");

                entity.Property(e => e.WorkUnit)
                    .HasMaxLength(30)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<YourTableName>(entity =>
            {
                entity.HasKey(e => e.DawningsheepId)
                    .HasName("PK__YourTabl__40A28A3CA79E22DB");

                entity.ToTable("YourTableName");

                entity.Property(e => e.AddName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.AddTime).HasColumnType("datetime");

                entity.Property(e => e.DawningsheepReceipts).HasMaxLength(20);

                entity.Property(e => e.DawningsheepTime).HasColumnType("datetime");

                entity.Property(e => e.DawningsheepWeight)
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.DelName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.DelTime).HasColumnType("datetime");

                entity.Property(e => e.ElEarTag)
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.OverBit).HasMaxLength(20);

                entity.Property(e => e.PurchaseSerialNumber).HasMaxLength(20);

                entity.Property(e => e.Remarks)
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateName)
                    .HasMaxLength(40)
                    .IsUnicode(false);

                entity.Property(e => e.UpdateTime).HasColumnType("datetime");
            });

            OnModelCreatingPartial(modelBuilder);
        }

        partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
    }
}
